// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System;
using System.Collections.Generic;

namespace SnapObjects.Data
{
    public class SqlSyntaxDescription
    {
        public SqlSyntaxDescription(
            string sqlText,
            IDictionary<string, string> parameterNames,
            bool isProcedure = false)
        {
            this.Parameters = new Dictionary<string, string>(
                parameterNames, StringComparer.OrdinalIgnoreCase);
            this.SqlText = sqlText;
            this.IsProcedure = isProcedure;
        }

        public IReadOnlyDictionary<string, string> Parameters { get; }

        public bool IsProcedure { get; }

        public string SqlText { get; }
    }
}
